// Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
// Project developers.  See the top-level LICENSE file for dates and other
// details.  No copyright assignment is required to contribute to VisIt.

#include <PyResampleAttributes.h>
#include <ObserverToCallback.h>
#include <stdio.h>
#include <Py2and3Support.h>

// ****************************************************************************
// Module: PyResampleAttributes
//
// Purpose:
//   Atts for Resample operator
//
// Note:       Autogenerated by xml2python. Do not modify by hand!
//
// Programmer: xml2python
// Creation:   omitted
//
// ****************************************************************************

//
// This struct contains the Python type information and a ResampleAttributes.
//
struct ResampleAttributesObject
{
    PyObject_HEAD
    ResampleAttributes *data;
    bool        owns;
    PyObject   *parent;
};

//
// Internal prototypes
//
static PyObject *NewResampleAttributes(int);
std::string
PyResampleAttributes_ToString(const ResampleAttributes *atts, const char *prefix, const bool forLogging)
{
    std::string str;
    char tmpStr[1000];

    if(atts->GetUseExtents())
        snprintf(tmpStr, 1000, "%suseExtents = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%suseExtents = 0\n", prefix);
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sstartX = %g\n", prefix, atts->GetStartX());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sendX = %g\n", prefix, atts->GetEndX());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%ssamplesX = %d\n", prefix, atts->GetSamplesX());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sstartY = %g\n", prefix, atts->GetStartY());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sendY = %g\n", prefix, atts->GetEndY());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%ssamplesY = %d\n", prefix, atts->GetSamplesY());
    str += tmpStr;
    if(atts->GetIs3D())
        snprintf(tmpStr, 1000, "%sis3D = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sis3D = 0\n", prefix);
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sstartZ = %g\n", prefix, atts->GetStartZ());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sendZ = %g\n", prefix, atts->GetEndZ());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%ssamplesZ = %d\n", prefix, atts->GetSamplesZ());
    str += tmpStr;
    const char *tieResolver_names = "random, largest, smallest";
    switch (atts->GetTieResolver())
    {
      case ResampleAttributes::random:
          snprintf(tmpStr, 1000, "%stieResolver = %srandom  # %s\n", prefix, prefix, tieResolver_names);
          str += tmpStr;
          break;
      case ResampleAttributes::largest:
          snprintf(tmpStr, 1000, "%stieResolver = %slargest  # %s\n", prefix, prefix, tieResolver_names);
          str += tmpStr;
          break;
      case ResampleAttributes::smallest:
          snprintf(tmpStr, 1000, "%stieResolver = %ssmallest  # %s\n", prefix, prefix, tieResolver_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    snprintf(tmpStr, 1000, "%stieResolverVariable = \"%s\"\n", prefix, atts->GetTieResolverVariable().c_str());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sdefaultValue = %g\n", prefix, atts->GetDefaultValue());
    str += tmpStr;
    if(atts->GetDistributedResample())
        snprintf(tmpStr, 1000, "%sdistributedResample = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sdistributedResample = 0\n", prefix);
    str += tmpStr;
    if(atts->GetCellCenteredOutput())
        snprintf(tmpStr, 1000, "%scellCenteredOutput = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%scellCenteredOutput = 0\n", prefix);
    str += tmpStr;
    return str;
}

static PyObject *
ResampleAttributes_Notify(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    obj->data->Notify();
    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_SetUseExtents(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the useExtents in the object.
    obj->data->SetUseExtents(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetUseExtents(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetUseExtents()?1L:0L);
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetStartX(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the startX in the object.
    obj->data->SetStartX(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetStartX(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetStartX());
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetEndX(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the endX in the object.
    obj->data->SetEndX(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetEndX(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetEndX());
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetSamplesX(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the samplesX in the object.
    obj->data->SetSamplesX(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetSamplesX(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetSamplesX()));
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetStartY(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the startY in the object.
    obj->data->SetStartY(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetStartY(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetStartY());
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetEndY(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the endY in the object.
    obj->data->SetEndY(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetEndY(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetEndY());
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetSamplesY(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the samplesY in the object.
    obj->data->SetSamplesY(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetSamplesY(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetSamplesY()));
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetIs3D(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the is3D in the object.
    obj->data->SetIs3D(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetIs3D(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetIs3D()?1L:0L);
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetStartZ(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the startZ in the object.
    obj->data->SetStartZ(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetStartZ(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetStartZ());
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetEndZ(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the endZ in the object.
    obj->data->SetEndZ(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetEndZ(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetEndZ());
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetSamplesZ(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the samplesZ in the object.
    obj->data->SetSamplesZ(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetSamplesZ(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetSamplesZ()));
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetTieResolver(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 3)
    {
        std::stringstream ss;
        ss << "An invalid tieResolver value was given." << std::endl;
        ss << "Valid values are in the range [0,2]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " random";
        ss << ", largest";
        ss << ", smallest";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the tieResolver in the object.
    obj->data->SetTieResolver(ResampleAttributes::TieResolver(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetTieResolver(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetTieResolver()));
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetTieResolverVariable(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged as first member of a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyUnicode_Check(packaged_args))
            args = packaged_args;
    }

    if (!PyUnicode_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
    }

    char const *val = PyUnicode_AsUTF8(args);
    std::string cval = std::string(val);

    if (val == 0 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
    }

    Py_XDECREF(packaged_args);

    // Set the tieResolverVariable in the object.
    obj->data->SetTieResolverVariable(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetTieResolverVariable(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyString_FromString(obj->data->GetTieResolverVariable().c_str());
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetDefaultValue(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the defaultValue in the object.
    obj->data->SetDefaultValue(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetDefaultValue(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetDefaultValue());
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetDistributedResample(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the distributedResample in the object.
    obj->data->SetDistributedResample(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetDistributedResample(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetDistributedResample()?1L:0L);
    return retval;
}

/*static*/ PyObject *
ResampleAttributes_SetCellCenteredOutput(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the cellCenteredOutput in the object.
    obj->data->SetCellCenteredOutput(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
ResampleAttributes_GetCellCenteredOutput(PyObject *self, PyObject *args)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetCellCenteredOutput()?1L:0L);
    return retval;
}



PyMethodDef PyResampleAttributes_methods[RESAMPLEATTRIBUTES_NMETH] = {
    {"Notify", ResampleAttributes_Notify, METH_VARARGS},
    {"SetUseExtents", ResampleAttributes_SetUseExtents, METH_VARARGS},
    {"GetUseExtents", ResampleAttributes_GetUseExtents, METH_VARARGS},
    {"SetStartX", ResampleAttributes_SetStartX, METH_VARARGS},
    {"GetStartX", ResampleAttributes_GetStartX, METH_VARARGS},
    {"SetEndX", ResampleAttributes_SetEndX, METH_VARARGS},
    {"GetEndX", ResampleAttributes_GetEndX, METH_VARARGS},
    {"SetSamplesX", ResampleAttributes_SetSamplesX, METH_VARARGS},
    {"GetSamplesX", ResampleAttributes_GetSamplesX, METH_VARARGS},
    {"SetStartY", ResampleAttributes_SetStartY, METH_VARARGS},
    {"GetStartY", ResampleAttributes_GetStartY, METH_VARARGS},
    {"SetEndY", ResampleAttributes_SetEndY, METH_VARARGS},
    {"GetEndY", ResampleAttributes_GetEndY, METH_VARARGS},
    {"SetSamplesY", ResampleAttributes_SetSamplesY, METH_VARARGS},
    {"GetSamplesY", ResampleAttributes_GetSamplesY, METH_VARARGS},
    {"SetIs3D", ResampleAttributes_SetIs3D, METH_VARARGS},
    {"GetIs3D", ResampleAttributes_GetIs3D, METH_VARARGS},
    {"SetStartZ", ResampleAttributes_SetStartZ, METH_VARARGS},
    {"GetStartZ", ResampleAttributes_GetStartZ, METH_VARARGS},
    {"SetEndZ", ResampleAttributes_SetEndZ, METH_VARARGS},
    {"GetEndZ", ResampleAttributes_GetEndZ, METH_VARARGS},
    {"SetSamplesZ", ResampleAttributes_SetSamplesZ, METH_VARARGS},
    {"GetSamplesZ", ResampleAttributes_GetSamplesZ, METH_VARARGS},
    {"SetTieResolver", ResampleAttributes_SetTieResolver, METH_VARARGS},
    {"GetTieResolver", ResampleAttributes_GetTieResolver, METH_VARARGS},
    {"SetTieResolverVariable", ResampleAttributes_SetTieResolverVariable, METH_VARARGS},
    {"GetTieResolverVariable", ResampleAttributes_GetTieResolverVariable, METH_VARARGS},
    {"SetDefaultValue", ResampleAttributes_SetDefaultValue, METH_VARARGS},
    {"GetDefaultValue", ResampleAttributes_GetDefaultValue, METH_VARARGS},
    {"SetDistributedResample", ResampleAttributes_SetDistributedResample, METH_VARARGS},
    {"GetDistributedResample", ResampleAttributes_GetDistributedResample, METH_VARARGS},
    {"SetCellCenteredOutput", ResampleAttributes_SetCellCenteredOutput, METH_VARARGS},
    {"GetCellCenteredOutput", ResampleAttributes_GetCellCenteredOutput, METH_VARARGS},
    {NULL, NULL}
};

//
// Type functions
//

static void
ResampleAttributes_dealloc(PyObject *v)
{
   ResampleAttributesObject *obj = (ResampleAttributesObject *)v;
   if(obj->parent != 0)
       Py_DECREF(obj->parent);
   if(obj->owns)
       delete obj->data;
}

static PyObject *ResampleAttributes_richcompare(PyObject *self, PyObject *other, int op);
PyObject *
PyResampleAttributes_getattr(PyObject *self, char *name)
{
    if(strcmp(name, "useExtents") == 0)
        return ResampleAttributes_GetUseExtents(self, NULL);
    if(strcmp(name, "startX") == 0)
        return ResampleAttributes_GetStartX(self, NULL);
    if(strcmp(name, "endX") == 0)
        return ResampleAttributes_GetEndX(self, NULL);
    if(strcmp(name, "samplesX") == 0)
        return ResampleAttributes_GetSamplesX(self, NULL);
    if(strcmp(name, "startY") == 0)
        return ResampleAttributes_GetStartY(self, NULL);
    if(strcmp(name, "endY") == 0)
        return ResampleAttributes_GetEndY(self, NULL);
    if(strcmp(name, "samplesY") == 0)
        return ResampleAttributes_GetSamplesY(self, NULL);
    if(strcmp(name, "is3D") == 0)
        return ResampleAttributes_GetIs3D(self, NULL);
    if(strcmp(name, "startZ") == 0)
        return ResampleAttributes_GetStartZ(self, NULL);
    if(strcmp(name, "endZ") == 0)
        return ResampleAttributes_GetEndZ(self, NULL);
    if(strcmp(name, "samplesZ") == 0)
        return ResampleAttributes_GetSamplesZ(self, NULL);
    if(strcmp(name, "tieResolver") == 0)
        return ResampleAttributes_GetTieResolver(self, NULL);
    if(strcmp(name, "random") == 0)
        return PyInt_FromLong(long(ResampleAttributes::random));
    if(strcmp(name, "largest") == 0)
        return PyInt_FromLong(long(ResampleAttributes::largest));
    if(strcmp(name, "smallest") == 0)
        return PyInt_FromLong(long(ResampleAttributes::smallest));

    if(strcmp(name, "tieResolverVariable") == 0)
        return ResampleAttributes_GetTieResolverVariable(self, NULL);
    if(strcmp(name, "defaultValue") == 0)
        return ResampleAttributes_GetDefaultValue(self, NULL);
    if(strcmp(name, "distributedResample") == 0)
        return ResampleAttributes_GetDistributedResample(self, NULL);
    if(strcmp(name, "cellCenteredOutput") == 0)
        return ResampleAttributes_GetCellCenteredOutput(self, NULL);


    // Add a __dict__ answer so that dir() works
    if (!strcmp(name, "__dict__"))
    {
        PyObject *result = PyDict_New();
        for (int i = 0; PyResampleAttributes_methods[i].ml_meth; i++)
            PyDict_SetItem(result,
                PyString_FromString(PyResampleAttributes_methods[i].ml_name),
                PyString_FromString(PyResampleAttributes_methods[i].ml_name));
        return result;
    }

    return Py_FindMethod(PyResampleAttributes_methods, self, name);
}

int
PyResampleAttributes_setattr(PyObject *self, char *name, PyObject *args)
{
    PyObject NULL_PY_OBJ;
    PyObject *obj = &NULL_PY_OBJ;

    if(strcmp(name, "useExtents") == 0)
        obj = ResampleAttributes_SetUseExtents(self, args);
    else if(strcmp(name, "startX") == 0)
        obj = ResampleAttributes_SetStartX(self, args);
    else if(strcmp(name, "endX") == 0)
        obj = ResampleAttributes_SetEndX(self, args);
    else if(strcmp(name, "samplesX") == 0)
        obj = ResampleAttributes_SetSamplesX(self, args);
    else if(strcmp(name, "startY") == 0)
        obj = ResampleAttributes_SetStartY(self, args);
    else if(strcmp(name, "endY") == 0)
        obj = ResampleAttributes_SetEndY(self, args);
    else if(strcmp(name, "samplesY") == 0)
        obj = ResampleAttributes_SetSamplesY(self, args);
    else if(strcmp(name, "is3D") == 0)
        obj = ResampleAttributes_SetIs3D(self, args);
    else if(strcmp(name, "startZ") == 0)
        obj = ResampleAttributes_SetStartZ(self, args);
    else if(strcmp(name, "endZ") == 0)
        obj = ResampleAttributes_SetEndZ(self, args);
    else if(strcmp(name, "samplesZ") == 0)
        obj = ResampleAttributes_SetSamplesZ(self, args);
    else if(strcmp(name, "tieResolver") == 0)
        obj = ResampleAttributes_SetTieResolver(self, args);
    else if(strcmp(name, "tieResolverVariable") == 0)
        obj = ResampleAttributes_SetTieResolverVariable(self, args);
    else if(strcmp(name, "defaultValue") == 0)
        obj = ResampleAttributes_SetDefaultValue(self, args);
    else if(strcmp(name, "distributedResample") == 0)
        obj = ResampleAttributes_SetDistributedResample(self, args);
    else if(strcmp(name, "cellCenteredOutput") == 0)
        obj = ResampleAttributes_SetCellCenteredOutput(self, args);

    if (obj != NULL && obj != &NULL_PY_OBJ)
        Py_DECREF(obj);

    if (obj == &NULL_PY_OBJ)
    {
        obj = NULL;
        PyErr_Format(PyExc_NameError, "name '%s' is not defined", name);
    }
    else if (obj == NULL && !PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "unknown problem with '%s'", name);

    return (obj != NULL) ? 0 : -1;
}

static int
ResampleAttributes_print(PyObject *v, FILE *fp, int flags)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)v;
    fprintf(fp, "%s", PyResampleAttributes_ToString(obj->data, "",false).c_str());
    return 0;
}

PyObject *
ResampleAttributes_str(PyObject *v)
{
    ResampleAttributesObject *obj = (ResampleAttributesObject *)v;
    return PyString_FromString(PyResampleAttributes_ToString(obj->data,"", false).c_str());
}

//
// The doc string for the class.
//
#if PY_MAJOR_VERSION > 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 5)
static const char *ResampleAttributes_Purpose = "Atts for Resample operator";
#else
static char *ResampleAttributes_Purpose = "Atts for Resample operator";
#endif

//
// Python Type Struct Def Macro from Py2and3Support.h
//
//         VISIT_PY_TYPE_OBJ( VPY_TYPE,
//                            VPY_NAME,
//                            VPY_OBJECT,
//                            VPY_DEALLOC,
//                            VPY_PRINT,
//                            VPY_GETATTR,
//                            VPY_SETATTR,
//                            VPY_STR,
//                            VPY_PURPOSE,
//                            VPY_RICHCOMP,
//                            VPY_AS_NUMBER)

//
// The type description structure
//

VISIT_PY_TYPE_OBJ(ResampleAttributesType,         \
                  "ResampleAttributes",           \
                  ResampleAttributesObject,       \
                  ResampleAttributes_dealloc,     \
                  ResampleAttributes_print,       \
                  PyResampleAttributes_getattr,   \
                  PyResampleAttributes_setattr,   \
                  ResampleAttributes_str,         \
                  ResampleAttributes_Purpose,     \
                  ResampleAttributes_richcompare, \
                  0); /* as_number*/

//
// Helper function for comparing.
//
static PyObject *
ResampleAttributes_richcompare(PyObject *self, PyObject *other, int op)
{
    // only compare against the same type 
    if ( Py_TYPE(self) != &ResampleAttributesType
         || Py_TYPE(other) != &ResampleAttributesType)
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

    PyObject *res = NULL;
    ResampleAttributes *a = ((ResampleAttributesObject *)self)->data;
    ResampleAttributes *b = ((ResampleAttributesObject *)other)->data;

    switch (op)
    {
       case Py_EQ:
           res = (*a == *b) ? Py_True : Py_False;
           break;
       case Py_NE:
           res = (*a != *b) ? Py_True : Py_False;
           break;
       default:
           res = Py_NotImplemented;
           break;
    }

    Py_INCREF(res);
    return res;
}

//
// Helper functions for object allocation.
//

static ResampleAttributes *defaultAtts = 0;
static ResampleAttributes *currentAtts = 0;

static PyObject *
NewResampleAttributes(int useCurrent)
{
    ResampleAttributesObject *newObject;
    newObject = PyObject_NEW(ResampleAttributesObject, &ResampleAttributesType);
    if(newObject == NULL)
        return NULL;
    if(useCurrent && currentAtts != 0)
        newObject->data = new ResampleAttributes(*currentAtts);
    else if(defaultAtts != 0)
        newObject->data = new ResampleAttributes(*defaultAtts);
    else
        newObject->data = new ResampleAttributes;
    newObject->owns = true;
    newObject->parent = 0;
    return (PyObject *)newObject;
}

static PyObject *
WrapResampleAttributes(const ResampleAttributes *attr)
{
    ResampleAttributesObject *newObject;
    newObject = PyObject_NEW(ResampleAttributesObject, &ResampleAttributesType);
    if(newObject == NULL)
        return NULL;
    newObject->data = (ResampleAttributes *)attr;
    newObject->owns = false;
    newObject->parent = 0;
    return (PyObject *)newObject;
}

///////////////////////////////////////////////////////////////////////////////
//
// Interface that is exposed to the VisIt module.
//
///////////////////////////////////////////////////////////////////////////////

PyObject *
ResampleAttributes_new(PyObject *self, PyObject *args)
{
    int useCurrent = 0;
    if (!PyArg_ParseTuple(args, "i", &useCurrent))
    {
        if (!PyArg_ParseTuple(args, ""))
            return NULL;
        else
            PyErr_Clear();
    }

    return (PyObject *)NewResampleAttributes(useCurrent);
}

//
// Plugin method table. These methods are added to the visitmodule's methods.
//
static PyMethodDef ResampleAttributesMethods[] = {
    {"ResampleAttributes", ResampleAttributes_new, METH_VARARGS},
    {NULL,      NULL}        /* Sentinel */
};

static Observer *ResampleAttributesObserver = 0;

std::string
PyResampleAttributes_GetLogString()
{
    std::string s("ResampleAtts = ResampleAttributes()\n");
    if(currentAtts != 0)
        s += PyResampleAttributes_ToString(currentAtts, "ResampleAtts.", true);
    return s;
}

static void
PyResampleAttributes_CallLogRoutine(Subject *subj, void *data)
{
    typedef void (*logCallback)(const std::string &);
    logCallback cb = (logCallback)data;

    if(cb != 0)
    {
        std::string s("ResampleAtts = ResampleAttributes()\n");
        s += PyResampleAttributes_ToString(currentAtts, "ResampleAtts.", true);
        cb(s);
    }
}

void
PyResampleAttributes_StartUp(ResampleAttributes *subj, void *data)
{
    if(subj == 0)
        return;

    currentAtts = subj;
    PyResampleAttributes_SetDefaults(subj);

    //
    // Create the observer that will be notified when the attributes change.
    //
    if(ResampleAttributesObserver == 0)
    {
        ResampleAttributesObserver = new ObserverToCallback(subj,
            PyResampleAttributes_CallLogRoutine, (void *)data);
    }

}

void
PyResampleAttributes_CloseDown()
{
    delete defaultAtts;
    defaultAtts = 0;
    delete ResampleAttributesObserver;
    ResampleAttributesObserver = 0;
}

PyMethodDef *
PyResampleAttributes_GetMethodTable(int *nMethods)
{
    *nMethods = 1;
    return ResampleAttributesMethods;
}

bool
PyResampleAttributes_Check(PyObject *obj)
{
    return (obj->ob_type == &ResampleAttributesType);
}

ResampleAttributes *
PyResampleAttributes_FromPyObject(PyObject *obj)
{
    ResampleAttributesObject *obj2 = (ResampleAttributesObject *)obj;
    return obj2->data;
}

PyObject *
PyResampleAttributes_New()
{
    return NewResampleAttributes(0);
}

PyObject *
PyResampleAttributes_Wrap(const ResampleAttributes *attr)
{
    return WrapResampleAttributes(attr);
}

void
PyResampleAttributes_SetParent(PyObject *obj, PyObject *parent)
{
    ResampleAttributesObject *obj2 = (ResampleAttributesObject *)obj;
    obj2->parent = parent;
}

void
PyResampleAttributes_SetDefaults(const ResampleAttributes *atts)
{
    if(defaultAtts)
        delete defaultAtts;

    defaultAtts = new ResampleAttributes(*atts);
}

